﻿using System;
using System.Collections.Generic;
using System.Text;

namespace com.crawler.common
{
    public enum ChapterOrderType
    {
        /// <summary>
        /// 正序
        /// </summary>
        ASC,
        /// <summary>
        /// 到讯
        /// </summary>
        DESC
    }

    [Serializable]
    public class BookSiteInfo
    {
        /// <summary>
        /// 站点ID
        /// </summary>
        public int SiteId { get; set; }

        /// <summary>
        /// 站点名称
        /// </summary>
        public string SiteName { get; set; }

        /// <summary>
        /// 站点编码
        /// </summary>
        public string SiteEncoding { get; set; }

        /// <summary>
        /// 是否是正版站点
        /// </summary>
        public bool IsVip { get; set; }

        /// <summary>
        /// 小说列表地址
        /// </summary>
        public string BookListUrl { get; set; }

        /// <summary>
        /// 小说列表正则
        /// </summary>
        public string BookListReg { get; set; }

        /// <summary>
        /// 小说列表书名索引
        /// </summary>
        public int BookNameRegIndex { get; set; }

        /// <summary>
        /// 小说列表小说地址正则
        /// </summary>
        public int BookUrlRegIndex { get; set; }

        /// <summary>
        /// 小说详情正则
        /// </summary>
        public string BookReg { get; set; }

        /// <summary>
        /// 小说详情书名索引
        /// </summary>
        public int BookNameRegIndex2 { get; set; }

        /// <summary>
        /// 作者索引
        /// </summary>
        public int AuthorNameRegIndex { get; set; }

        /// <summary>
        /// 大类正则索引
        /// </summary>
        public int CategoryNameRegIndex { get; set; }

        /// <summary>
        /// 小类索引
        /// </summary>
        public int SubCategoryNameRegIndex { get; set; }

        /// <summary>
        /// 封面索引
        /// </summary>
        public int ICONRegIndex { get; set; }

        /// <summary>
        /// 简介索引
        /// </summary>
        public int DescriptionRegIndex { get; set; }

        /// <summary>
        /// 章节列表地址索引
        /// </summary>
        public int ChapterListUrlIndex { get; set; }

        /// <summary>
        /// 章节列表正则
        /// </summary>
        public string ChapterListReg { get; set; }

        /// <summary>
        /// 章节名称索引
        /// </summary>
        public int ChapterNameRegIndex { get; set; }

        /// <summary>
        /// 章节地址索引
        /// </summary>
        public int ChapterUrlRegIndex { get; set; }

        /// <summary>
        /// 更新时间索引
        /// </summary>
        public int UpdateTimeRegIndex { get; set; }

        /// <summary>
        /// 开始页码
        /// </summary>
        public int StartPageIndex { get; set; }

        /// <summary>
        /// 列表页结束页码
        /// </summary>
        public int EndPageIndex { get; set; }

        /// <summary>
        /// 章节排序方式
        /// </summary>
        public ChapterOrderType ChapterOrder { get; set; }

        /// <summary>
        /// 是否禁用
        /// </summary>
        public bool IsForbid { get; set; }

        /// <summary>
        /// 站点备注
        /// </summary>
        public string Memo { get; set; }

        /// <summary>
        /// 对应表名
        /// </summary>
        public string TbName { get; set; }

        /// <summary>
        /// 章节正则
        /// </summary>
        public string ChapterContentReg { get; set; }

        /// <summary>
        /// 章节内容过滤规则
        /// </summary>
        public string ChapterContentFilterReg { get; set; }
    }
}
